import Vue from 'vue'
import Vuex from 'vuex'
import mutations from '@/store/mutation.js'
Vue.use(Vuex)

const state={
  adminList:[
    {
      id:'1',
      title:'文章列表',
      icon:'el-icon-s-order',
      chil:[
        {id:'1-1',title:'查看文章',url:'/home/selectArticle'},
        {id:'1-2',title:'添加文章',url:'/home/addArticle'},
        {id:'1-3',title:'回收站',url:'/home/recycle'}
      ]
    },{
      id:'2',
      title:'评论管理',
      icon:'el-icon-s-comment',
      chil:[
        {id:'2-1',title:'查看评论',url:'/home/comment'},
      ]
    },{
      id:'3',
      title:'分类管理',
      icon:'el-icon-menu',
      chil:[
        {id:'3-1',title:'查看分类',url:'/home/selectClass'},
      ]
    },{
      id:'4',
      title:'标签管理',
      icon:'el-icon-s-opportunity',
      chil:[
        {id:'4-1',title:'查看标签',url:'/home/lable'},
      ]
    },{
      id:'5',
      title:'友链管理',
      icon:'el-icon-s-custom',
      chil:[
        {id:'5-1',title:'查看友链',url:'/home/FriendChain'},
      ]
    },{
      id:'6',
      title:'系统设置',
      icon:'el-icon-s-tools',
      chil:[
        {id:'6-1',title:'设置'},
      ]
    },
    {
      id:'7',
      title:'用户管理',
      icon:'el-icon-share',
      chil:[
        {id:'7-1',title:'查看用户',url:'/home/userInfo'},
      ]
    }
  ],
  updateId:'',
  userLogin:false,
  indexData:[],
  indexTotal:'',
  replace:'#',
  loading:true,
  aritcle:[],
  userId:'',
  userInfo:{}
}

export default new Vuex.Store({
  mode: 'hash',
	strict: process.env.NODE_ENV !== 'production',
  state,
  mutations,
})
